home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Amiga-E
/
E_v3.2a
/
Src
/
Intui
/
AppMenuItem.e
next >
Wrap
Text File
|
1992-09-02
|
604b
|
24 lines
/* AppMenuItem.e, loosely adapted from RKRM libraries 3rd ed. */
OPT OSVERSION=37
MODULE 'wb'
DEF myport,appitem,appmsg
PROC main()
IF workbenchbase:=OpenLibrary('workbench.library',37)
IF myport:=CreateMsgPort()
IF appitem:=AddAppMenuItemA(0,0,'DisplayBeep()',myport,NIL)
WriteF('Come on, go and see whats in the Tools menu ...\n')
WaitPort(myport)
DisplayBeep(NIL)
WriteF('Wow, you found it!\n')
RemoveAppMenuItem(appitem)
WHILE appmsg:=GetMsg(myport) DO ReplyMsg(appmsg)
ENDIF
DeleteMsgPort(myport)
ENDIF
ENDIF
ENDPROC